package com.whmall.service.crm.provider;

import com.whmall.component.entity.dto.OperatorReqDTO;
import com.whmall.component.entity.dto.PageReqDTO;
import com.whmall.component.entity.dto.PageRspDTO;
import com.whmall.service.crm.api.CompanyEventApi;
import com.whmall.service.crm.entity.dto.company.CompanyEventCreateReqDTO;
import com.whmall.service.crm.entity.dto.company.CompanyEventQueryReqDTO;
import com.whmall.service.crm.entity.dto.company.CompanyEventRspDTO;
import com.whmall.service.crm.entity.dto.company.CompanyEventUpdateReqDTO;
import org.apache.dubbo.config.annotation.DubboService;
import com.whmall.service.crm.module.company.service.CompanyEventService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@DubboService(interfaceClass = CompanyEventApi.class)
public class CompanyEventProvider implements CompanyEventApi{

    @Autowired
    private CompanyEventService companyEventService;

    @Override
    public PageRspDTO<CompanyEventRspDTO> page(PageReqDTO pageReqDTO, CompanyEventQueryReqDTO companyEventQueryReqDTO) {
        return companyEventService.page(pageReqDTO,companyEventQueryReqDTO);
    }

    @Override
    public void save(CompanyEventCreateReqDTO reqDTO, OperatorReqDTO operatorReqDTO) {
        companyEventService.save(reqDTO,operatorReqDTO);
    }

    @Override
    public void update(CompanyEventUpdateReqDTO reqDTO, OperatorReqDTO operatorReqDTO) {
        companyEventService.update(reqDTO,operatorReqDTO);
    }

    @Override
    public void removeById(Long id, OperatorReqDTO operatorReqDTO) {
        companyEventService.removeById(id,operatorReqDTO);
    }
}